When boot device is cdrom but the cdrom is not bootable, the guest appears
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 28 Apr 2006 13:33:40 +0000 (14:33 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 28 Apr 2006 13:33:40 +0000 (14:33 +0100)
to hang. This patch fixes this by filling in second- and third-priority
fallback boot devices.

Signed-off by: Chen Jun <chenjunb@lenovo.com>

tools/ioemu/hw/pc.c

index d2de9abc3d3be8b7cd5c017e41ed54fa2eefae60..d2b72ac7fb0424d13f9bdda74596b71be5ccce18 100644 (file)
@@ -166,14 +166,20 @@ static void cmos_init(uint64_t ram_size, int boot_device, BlockDriverState **hd_
     switch(boot_device) {
     case 'a':
     case 'b':
-        rtc_set_memory(s, 0x3d, 0x01); /* floppy boot */
+        //rtc_set_memory(s, 0x3d, 0x01); /* floppy boot */
+        rtc_set_memory(s, 0x3d, 0x21);   /* a->c->d */
+        rtc_set_memory(s, 0x38, 0x30);
         break;
     default:
     case 'c':
-        rtc_set_memory(s, 0x3d, 0x02); /* hard drive boot */
+        //rtc_set_memory(s, 0x3d, 0x02); /* hard drive boot */
+        rtc_set_memory(s, 0x3d, 0x32);   /* c->d->a */
+        rtc_set_memory(s, 0x38, 0x10);
         break;
     case 'd':
-        rtc_set_memory(s, 0x3d, 0x03); /* CD-ROM boot */
+        //rtc_set_memory(s, 0x3d, 0x03); /* CD-ROM boot */
+        rtc_set_memory(s, 0x3d, 0x23);   /* d->c->a */
+        rtc_set_memory(s, 0x38, 0x10);
         break;
     }